package com.lims.landInfo.dao;

import org.springframework.stereotype.Repository;

import javacommon.base.*;

import cn.org.rapid_framework.page.Page;

import com.lims.landInfo.model.*;
import com.lims.landInfo.vo.query.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */@Repository @SuppressWarnings("unchecked")
public class LandDictionaryDao extends BaseHibernateDao<LandDictionary,java.lang.String>{
	
	public Class getEntityClass() {
		return LandDictionary.class;
	}
	
	public Page findPage(LandDictionaryQuery query) {
        //XsqlBuilder syntax,please see http://code.google.com/p/rapid-xsqlbuilder
        // [column]为字符串拼接, {column}为使用占位符. [column]为使用字符串拼接,如username='[username]',偷懒时可以使用字符串拼接 
        // [column] 为PageRequest的属性
		String sql = "select t from LandDictionary t where 1=1 "
			  	+ "/~ and t.sno = {sno} ~/"
			  	+ "/~ and t.talName = {talName} ~/"
			  	+ "/~ and t.colName = {colName} ~/"
			  	+ "/~ and t.colno = {colno} ~/"
			  	+ "/~ and t.dicKey = {dicKey} ~/"
			  	+ "/~ and t.dicValue = {dicValue} ~/"
			  	+ "/~ and t.describe = {describe} ~/"
				+ " order by sno asc";
		return pageQuery(sql,query);
	}
	

}
